<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />

		<title><?php echo $this->meta()->title(); ?></title>
		
		
		<link rel="stylesheet" href="/stylesheets/foundation.min.css">
		<link rel="stylesheet" href="/stylesheets/app.css">

		<script src="/javascripts/foundation/modernizr.foundation.js"></script>
	</head>
	
	<body>
		
		<!-- Nav Bar -->
		<div class="row">
			<div class="twelve columns">
				
			<div class="usr-bar">
				<a href="/"><?php //echo _('Зарегистрироваться'); ?></a> &nbsp;
				<?php if($this->userInfo && isset($this->userInfo['id'])) { ?>
				<a href="<?php echo $this->url('logout'); ?>"><?php echo _('Выйти'); ?></a>
				<?php } else { ?>
				<a href="<?php echo $this->url('login'); ?>"><?php echo _('Войти'); ?></a>
				<?php } ?>
			</div>
				
			<?php if($this->userInfo && isset($this->userInfo['id'])) { ?>
			<ul class="nav-bar">
				<li><a href="<?php echo $this->url('randomCart', array()); ?>"><?php echo _('Случайная карточка'); ?></a></li>
				<li><a href="<?php echo $this->url('myCarts', array()); ?>"><?php echo _('Мои карточки'); ?></a></li>
				<li><a href="#"><?php echo _('Наші послуги'); ?></a></li>
				<li><a href="#"><?php echo _('Ціни'); ?></a></li>

				<li class="langs">
					<?php 
					$aLangs = array(
						'uk' => _('укр'),
						'ru' => _('рос'),
						'en' => _('eng')
					);
					?>

					<?php foreach ($this->configs->langs['locales'] as $lang => $title): ?>
						<?php if ($lang != \Core\Langs::getLang() ): ?>
					<a class="<?php echo $lang; ?>" title="<?php echo $title; ?>" href="<?php echo \Core\Langs::changeLangUrl($lang); ?>"><?php echo $aLangs[$lang] ?></a>
						<?php else: ?>
					<span class="d-ib" title="<?php echo $title; ?>"><?php echo $aLangs[$lang] ?></span>
						<?php endif; ?>
					<?php endforeach; ?>
				</li>
			</ul>
			<?php } ?>

			<h1><a href="<?php echo $this->url('home'); ?>">Eng</a> <small>the learn language with me.</small>
			<hr />
			</div>
		</div>
		
		<!-- Main Page Content and Sidebar -->
		<div class="row">

			<!-- Main Blog Content -->
			<div class="nine columns" role="content">

				<?php echo $this->layout->content; ?>
				
				

			</div>
			<!-- End Main Content -->
		
			<!-- Sidebar -->
			<aside class="three columns">

			

			<?php echo isset($this->layout->right) ? $this->layout->right : ''; ?>
			
<!--			<div class="panel">
				<h5>Featured</h5>
				<p>Pork drumstick turkey fugiat. Tri-tip elit turducken pork chop in. Swine short ribs meatball irure bacon nulla pork belly cupidatat meatloaf cow.</p>
				<a href="#">Read More &rarr;</a>
			</div>-->

			</aside>
			<!-- End Sidebar -->
		</div>
		
		<!-- Footer -->
		<footer class="row">
			<div class="twelve columns">
			<hr />
			<div class="row">
				<div class="six columns">
				<p>&copy; Copyright no one at all. Go to town.</p>
				</div>
				<div class="six columns">
				<ul class="link-list right">
					<li><a href="<?php echo $this->url('home'); ?>"><?php echo _('Случайная карточка'); ?></a></li>
				</ul>
				</div>
			</div>
			</div>
		</footer>
		<!-- End Footer -->
		
		<!-- Included JS Files (Compressed) -->
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<script src="/javascripts/foundation.min.js"></script>
		<script src="/javascripts/app.js"></script>
		
	</body>
</html>